import numpy as np

n = 6
tj = [1,2,3,4,5,6]
qww = [2,3,4,5,6,7]

tj.sort()
qww.sort()
A = np.zeros((2,n))

for i in range(n):
    if tj[0] > qww[0]:
        A[0,i] = tj.pop(0)
        A[1,i] = qww.pop(0)
    elif tj[0] < qww[0]:
        A[0,i] = tj.pop(0)
        A[1,i] = qww.pop(-1)
    else:
        if tj[-1] > qww[-1]:
            A[0,i] = tj.pop(-1)
            A[1,i] = qww.pop(-1)
        else:
            A[0,i] = tj.pop(0)
            A[1,i] = qww.pop(-1)


print("安排表：")
print(A)
print("银币数：", 200*(np.sum((A[0]-A[1])>0)-np.sum((A[0]-A[1])<0)))
